package service

import (
	"boy-go/modules/system/model"
	"boy-go/modules/system/vo"
	"boy-go/pkg/request"
)

type SysUserService interface {
	GetSysUser(userId int64) *model.SysUser
	SelectById(userId int64) (*vo.SysUserModel, error)
	SelectUserList(req *vo.QuerySysUserReq, pageReq *request.PageRequest) (*vo.ListSysUserRsp, error)
	InsertUser(req *vo.AddSysUserReq) (*vo.AddSysUserRsp, error)
	UpdateUser(req *vo.EditSysUserReq) (*vo.EditSysUserRsp, error)
	DeleteUserById(userId int64) error
	DeleteUserByIds(userIds []string) error
	CheckUserAllowed(userId *int64) error
	CheckUserDataScope(userId *int64) error
	ResetPwd(req *vo.ResetPwdSysUserReq) error
	UpdateUserStatus(req *vo.ChangeSysUserReq) error
	CheckUserNameUnique(userId int64, userName *string) bool // 用户名是否唯一
	CheckPhoneUnique(userId int64, phone *string) bool       // 手机号码是否唯一
	CheckEmailUnique(userId int64, email *string) bool       // 邮箱是否唯一
	InsertUserAuth(userId int64, roleIds []*int64) error     //用户授权角色
	SelectAllocatedList(req *vo.QuerySysUserReq) (*vo.ListSysUserRsp, error)
	SelectUnallocatedList(req *vo.QuerySysUserReq) (*vo.ListSysUserRsp, error)
}
